import 'package:enterprise_v6_app/app/core/core.dart';

///特殊作业-带图标的标题
class CustomIconTitleView extends StatelessWidget {
  const CustomIconTitleView({required this.title, this.titleRightWidget, this.isShowTitleRightWidget, this.checkbox,  super.key});

  final String title;
  final Widget? titleRightWidget;
  final Widget? isShowTitleRightWidget;
  final Widget? checkbox;

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.symmetric(horizontal: 17.w, vertical: 12.w),
      child: Row(
        children: [
          checkbox ?? Container(),
          checkbox != null ? AppGaps.hGap10 : Container(),
          SvgPicture.asset(
            AppImages.icon_title,
            width: 20.w,
            height: 20.w,
          ),
          AppGaps.hGap6,
          // Expanded(
          //     child: Row(
          //   children: [
          //     Text(
          //       title,
          //       style: TextStyle(color: const Color(0xff262F38), height: 1.2, fontWeight: FontWeight.w500, fontSize: 14.sp),
          //     ),
          //     isShowTitleRightWidget ?? Container(),
          //   ],
          // )),
          Expanded(
              child: Text(
                title,
                style: TextStyle(
                    color: const Color(0xff262F38), height: 1.2, fontWeight: FontWeight.w500, fontSize: 14.sp),
              )),
          isShowTitleRightWidget ?? Container(),
          titleRightWidget ?? Container(),
        ],
      ),
    );
  }
}
